﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace TestOnlineProject.Models.Entities
{
    public class CustomTestModel
    {
        public int TestId { get; set; }
        [Required]
        public int TestTypeId { get; set; }
        public int UserId { get; set; }
        public int SubjectId { get; set; }
        [Required(ErrorMessage="The Section is required.")]
        public int SectionId { get; set; }
        [Required(ErrorMessage = "The Title is required.")]
        [StringLength(100, MinimumLength = 5, ErrorMessage = "The Title length is 5-100 characters.")]
        public string Title { get; set; }
        [Required]
        public string Expires { get; set; }
        [Required(ErrorMessage = "The Number of Questions is required.")]
        [Range(1, 60, ErrorMessage = "The Number of Questions is 1-60 questions")]
        public int NumberOfQuestions { get; set; }
        [Required(ErrorMessage = "The Duration is required.")]
        [Range(1, 60, ErrorMessage = "The Duration is 1-60 minutes.")]
        public int Duration { get; set; }
        public DateTime LastEditedTime { get; set; }
    }
}